package com.liuyang.concurrency.chapter2;

public class TicketWindow extends Thread{
    private static int index = 1;

    private final int MAX = 50;

    private  String name;

    public TicketWindow(String name) {
        this.name = name;
    }

    @Override
    public void run() {
        while(index <=MAX){
            System.out.println("柜台："+name+"开始叫号："+(index++));
        }
    }
}
